home *** CD-ROM | disk | FTP | other *** search
-
-
-
- CCCCDDDDFFFFRRRRAAAAMMMMEEEE((((4444)))) CCCCDDDDFFFFRRRRAAAAMMMMEEEE((((4444))))
-
-
-
- NNNNAAAAMMMMEEEE
- cdframe - structure of a frame of audio data on Compact Disc (CD)
-
- SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
- ####iiiinnnncccclllluuuuddddeeee <<<<ccccddddaaaauuuuddddiiiioooo....hhhh>>>>
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- Audio on Compact Discs (CD) is blocked into _f_r_a_m_e_s. The CD has 75 frames
- each second. One frame of data contains both audio and non-audio data
- (known as subcodes). These frames are frequently referred to as
- _s_u_b_c_o_d_e-_f_r_a_m_e_s because it takes one complete frame to assemble all the
- bits of a chunk of subcode. A program reading a CD in audio mode must
- read a minimum of one CD frame. This is enforced by the function
- _C_D_r_e_a_d_d_a(_3) in _l_i_b_c_d_a_u_d_i_o.
-
- The _c_d_f_r_a_m_e structure, describing the content of a frame of CD data, is
- defined in <<<<ccccddddaaaauuuuddddiiiioooo....hhhh>>>> as follows:
-
- typedef struct cdframe {
- char audio[CDDA_DATASIZE];
- struct subcodeQ subcode;
- } CDFRAME;
-
-
- AAAAuuuuddddiiiioooo DDDDaaaattttaaaa
- Audio samples in the _a_u_d_i_o array are linearly encoded in a 16-bit 2's
- complement format. Encoding is carried out either without pre-emphasis
- or with a first order 50/15 Ms pre-emphasis. The data stream contains
- two interleaved channels, usually used as the left and right channels of
- a stereo pair. The sample representing the left channel is first,
- followed by the sample representing the right channel. The sampling
- frequency is 44.1 kHz and both channels are sampled simultaneously during
- recording.
-
- The least significant byte of each 16-bit value is first. The bytes need
- to be swapped in order to match the native byte ordering of the IRIS
- Indigo and Personal IRIS 4D/35 and their audio hardware. So each 4-byte
- chunk of the data array represents a pair of samples (1 left plus 1
- right) as follows. Byte 0 is the least significant byte of the left
- channel sample; byte 1 is the most significant byte of the left channel
- sample. Byte 2 is the least significant byte of the simultaneous right
- channel sample; byte 3 is the most significant byte of the simultaneous
- right channel sample.
-
- CDDA_DATASIZE is 2352 bytes.
-
- SSSSuuuubbbbccccooooddddeeeessss
- The _s_u_b_c_o_d_e_Q structure contains information from the Q subcode fields
- recorded on the CD. CD's also have subcode fields P and R through W. P
- subcodes provide a simple track separator intended for use by low cost
- players. They have no useful purpose when the player is able to read and
- process the Q subcodes. Subcodes R through W are not yet fully defined
-
-
-
- PPPPaaaaggggeeee 1111
-
-
-
-
-
-
- CCCCDDDDFFFFRRRRAAAAMMMMEEEE((((4444)))) CCCCDDDDFFFFRRRRAAAAMMMMEEEE((((4444))))
-
-
-
- and some CD-ROM drives do not read them. The subcodeQ structure is
- defined in _c_d_a_u_d_i_o._h as follows:
-
- typedef struct subcodeQ {
- unchar control;
- unchar type;
- union {
- struct {
- struct cdpackedbcd { unchar dhi:4, dlo:4; } track;
- struct cdpackedbcd index; /* aka point during trk 0 */
- struct cdtimecode {
- unchar mhi:4, mlo:4;
- unchar shi:4, slo:4;
- unchar fhi:4, flo:4;
- } ptime;
- struct cdtimecode atime;
- unchar fill[6];
- } mode1;
- struct {
- unchar catalognumber[13];
- struct cdpackedbcd aframe;
- } mode2;
- struct {
- struct cdident {
- unchar country[2];
- unchar owner[3];
- unchar year[2];
- unchar serial[5];
- } ident;
- struct cdpackedbcd aframe;
- unchar fill;
- } mode3;
- } data;
- } CDSUBCODEQ;
-
-
- The ccccoooonnnnttttrrrroooollll field contains 4 flag bits in its least significant nibble to
- define the kind of information in a track (program item).
-
- 0 0 X 0 - 2 audio channels without pre-emphasis
- 0 0 X 1 - 2 audio channels with pre-emphasis of 50/15 Ms
- 0 X 0 X - copy prohibited
- 0 X 1 X - copy permitted
-
-
- The bits of the control field can only change during an actual pause
- (iiiinnnnddddeeeexxxx....ddddhhhhiiii,,,, iiiinnnnddddeeeexxxx....ddddlllloooo == 00) of at least 2 s or during the lead-in area.
-
- Notes 1. -
- The four bits of the control field should be copied to the control
- field of the channel status of the digital audio interface for
- domestic use.
-
-
-
- PPPPaaaaggggeeee 2222
-
-
-
-
-
-
- CCCCDDDDFFFFRRRRAAAAMMMMEEEE((((4444)))) CCCCDDDDFFFFRRRRAAAAMMMMEEEE((((4444))))
-
-
-
- Notes 2. -
- For non-audio applications of the compact disc the following control
- codes have been defined:
-
-
-
- 0 1 X 0 - digital data
- 1 X X X - broadcasting use
-
-
- All other combinations will be defined later on.
-
- The ttttyyyyppppeeee field contains 4 address-bits in its least significant nibble
- that identify the type of the data field which is a union of three
- possible types.
-
- 0001 - mode 1
- 0010 - mode 2
- 0011 - mode 3
-
-
- MMMMooooddddeeee 1111 QQQQ DDDDaaaattttaaaa
- Mode 1 data contains track numbering and time code information. All
- numbers are encoded as BCD digits. ttttrrrraaaacccckkkk is the number of the current
- track. It is two BCD digits packed into a single byte. The most
- significant digit, dddd1111,,,, is in the most significant nibble. Audio program
- tracks are numbered from 01 - 99. Track number 00 is the lead-in track.
- Track number AA (each BCD digit has the bit-pattern 1010) is the lead-out
- track.
-
- Tracks may be subdivided into sections; each section has a unique index
- number. iiiinnnnddddeeeexxxx is the index number of the current subdivision within the
- track. Its representation is identical with ttttrrrraaaacccckkkk.... Regular subdivisions
- are numbered from 01 - 99. The first subdivision within a track must be
- numbered 01. The index number increases in increments of 1. Index
- number 00 indicates a pause and coincides with actual pauses (gaps
- between tracks) in the audio program. During index number 00, ttttrrrraaaacccckkkk is
- the number of the track that follows the pause. The first audio track is
- preceded by a pause encoding of 2 s to 3 s.
-
- During the lead-out track the subdivision number is 01.
-
- During the lead-in track a table of contents is recorded in the mode 1
- subcodes. During this time, the index number field, now known as _P_o_i_n_t,
- records a track number. The aaaattttiiiimmmmeeee field (see below) gives the starting
- position of the track given by _p_o_i_n_t. Several special track numbers are
- also valid at this time. If _p_o_i_n_t = A0 the minutes field of aaaattttiiiimmmmeeee
- contains the track number of the first track on the disk. The seconds
- and frame fields are zero. If _p_o_i_n_t = A1 the minutes field of aaaattttiiiimmmmeeee
- contains the track number of the last track on the disk. The seconds and
- frame fields are zero. If _p_o_i_n_t = A2 aaaattttiiiimmmmeeee contains the starting point
- of the lead-out track.
-
-
-
- PPPPaaaaggggeeee 3333
-
-
-
-
-
-
- CCCCDDDDFFFFRRRRAAAAMMMMEEEE((((4444)))) CCCCDDDDFFFFRRRRAAAAMMMMEEEE((((4444))))
-
-
-
- In normal use (i.e. except during lead-in) ppppttttiiiimmmmeeee is the time into the
- current program (track). aaaattttiiiimmmmeeee is the time from the start of the disc.
- In the _c_d_t_i_m_e_c_o_d_e structure, mmmmhhhhiiii and mmmmlllloooo are the current minute, sssshhhhiiii and
- sssslllloooo are the current second and ffffhhhhiiii and fffflllloooo are the current frame. Frame
- numbers run from 00 to 74.
-
- MMMMooooddddeeee 2222 QQQQ DDDDaaaattttaaaa
- Mode 2 data contains the catalogue number of the disc. ccccaaaattttaaaallllooooggggnnnnuuuummmmbbbbeeeerrrr is
- expressed in 13 BCD digits according to the UPC/EAN code. The catalogue
- number does not change on a disk. If no catalogue number is recorded
- these BCD digits are all zero.
-
- aaaaffffrrrraaaammmmeeee contains the continuation of the absolute frame numbering from
- mode 1. This allows an uninterrupted flow of frame numbers. It contains
- two packed BCD digits.
-
- MMMMooooddddeeee 3333 QQQQ DDDDaaaattttaaaa
- Mode 3 data is used to give a unique identification to an audio track.
- This is done by means of the International Standard Recording Code (ISO
- 3901). iiiiddddeeeennnntttt is the ISRC and it consists of several fields. ccccoooouuuunnnnttttrrrryyyy and
- oooowwwwnnnneeeerrrr are encoded in a six-bit format using the 6 least significant
- digits of each byte according to the following table:
-
- Octal ASCII Octal ASCII Octal ASCII
- ______________ _______________ ______________
- 000 0 023 C 037 O
- 001 1 024 D 040 P
- 002 2 025 E 041 Q
- 003 3 026 F 042 R
- 004 4 027 G 043 S
- 005 5 030 H 044 T
- 006 6 031 I 045 U
- 007 7 032 J 046 V
- 010 8 033 K 047 W
- 011 9 034 L 050 X
- 021 A 035 M 051 Y
- 022 B 036 N 052 Z
-
- yyyyeeeeaaaarrrr and sssseeeerrrriiiiaaaallll are BCD digits in the least significant nibbles of each
- byte.
-
- aaaaffffrrrraaaammmmeeee contains the continuation of the absolute frame numbering from
- mode 1. This allows an uninterrupted flow of frame numbers. It contains
- two packed BCD digits.
-
- SSSSEEEEEEEE AAAALLLLSSSSOOOO
- cdintro(3dm)
-
- _C_o_m_p_a_c_t _D_i_s_c _D_i_g_i_t_a_l _A_u_d_i_o _S_y_s_t_e_m. The International Electro-Technical
- Commission (IEC). Bureau Central de la Commission Electrotechnique
- Internationale, 3 rue de Varemb'e, Gen`eve, Suisse
-
-
-
-
- PPPPaaaaggggeeee 4444
-
-
-
-